package com.qbb.client.util;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class FileUtil {
	/**
	 * 获得指定目录的文件明细,不包括文件夹
	 * 
	 * @param filePath
	 * @return
	 */
	public static List<File> getPathFileNames(String filePath) {
		File dictionary = new File(filePath);
		if (!dictionary.isDirectory()) {
			return null;
		}
		File[] files = dictionary.listFiles();
		if (files == null) {
			return null;
		}

		List<File> fileList = new ArrayList<File>();

		int fileSize = files.length;
		for (int i = 0; i < fileSize; i++) {
			File file = files[i];
			if (file.isDirectory()) {
				continue;
			}
			fileList.add(file);
		}
		return fileList;
	}

}
